import axios from 'axios'
import { Toast } from 'vant';
const request = axios.create({
  baseURL: 'http://kumanxuan1.f3322.net:8001',
  timeout: 500
})

request.interceptors.request.use(config => {
  return config
}, err => {
  console.log(err)
  
  return Promise.reject(err)
})

request.interceptors.response.use(res => {
  return res.data
}, err => {
  Toast.fail('网络错误');
  console.log('网络错误');
  console.log(err)
})


export default request